<template>
  <div class="commentBox">
    <el-tabs tab-position="top" class="demo-tabs" v-model="activeName">
      <el-tab-pane label="基于深度强化学习优化交通信号灯" name="first">
        <Calc1></Calc1>
      </el-tab-pane>
      <el-tab-pane
        label="	
融合状态预测的深度强化学习优化交通信号灯"
        name="second"
      >
        <Calc2></Calc2>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup lang="ts">
import Calc1 from "@/pages/commentManage/components/Calc1.vue";
import Calc2 from "@/pages/commentManage/components/Calc2.vue";
import { toRefs, reactive, onMounted, ref } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();

const activeName = ref("first");
onMounted(() => {
  if (route.query.id == "1") {
    activeName.value = "first";
  } else if (route.query.id == "2") {
    activeName.value = "second";
  }
});
</script>

<style scoped lang="scss">
.commentBox {
  width: 100%;
  height: 100%;
  .demo-tabs {
    flex: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    &:deep(.el-tabs__content) {
      flex-grow: 1;
      overflow-y: scroll;
    }
  }
}
</style>
